home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / rtfmaker.sit / RTF Maker / background_2747.txt < prev    next >
Text File  |  1990-02-06  |  1KB  |  50 lines

  1. -- background: 2747 from stack: in
  2. -- bmap block id: 3078
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on removeFormats
  8.   if the selectedText is empty then exit removeFormats
  9.   put the selectedText into theText
  10.   set cursor to 4
  11.   repeat
  12.     put offset("{",theText) into left
  13.     put offset("}",theText) into right
  14.     if (left >= right) or (left is 0) then exit repeat
  15.     delete char right of theText
  16.     repeat
  17.       put char left of theText into nextChar
  18.       delete char left of theText
  19.       if nextChar is " " then exit repeat
  20.     end repeat
  21.   end repeat
  22.   put theText into the selection
  23. end removeFormats
  24.  
  25. on addFormat theCode
  26.   if theCode is empty then exit addFormat
  27.   put the selectedChunk into theSel     -- (so it can be re selected)
  28.   put "{\" & theCode && the selectedText & "}" into the selection
  29.   put word 4 of the selectedChunk into word 4 of theSel
  30.   select theSel
  31. end addFormat
  32.  
  33.  
  34. -- part 1 (field)
  35. -- low flags: 80
  36. -- high flags: 0007
  37. -- rect: left=378 top=150 right=334 bottom=511
  38. -- title width / last selected line: 0
  39. -- icon id / first selected line: 0 / 0
  40. -- text alignment: 0
  41. -- font id: 3
  42. -- text size: 9
  43. -- style flags: 0
  44. -- line height: 12
  45. -- part name: fontList
  46. ----- HyperTalk script -----
  47. on mouseUp
  48.   hide me
  49. end mouseUp
  50.